﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="in_box.aspx.cs" Inherits="cn_member_center_in_box" %>
         
<%@ Register Src="../UserControl/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="../UserControl/top_ad.ascx" TagName="top_ad" TagPrefix="uc2" %>
<%@ Register Src="../UserControl/member_menu.ascx" TagName="member_menu" TagPrefix="uc3" %>
<%@ Register Src="../UserControl/footer.ascx" TagName="footer" TagPrefix="uc4" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>收件箱，<%=(new Web.Old_App_Code.BasicSet()).TitleBind() %></title>
    <meta name="Keywords" content="<%=(new Web.Old_App_Code.BasicSet()).KeywordBind() %>" />
    <meta name="Description" content="<%=(new Web.Old_App_Code.BasicSet()).DescriptionBind() %>" />
    <link href="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>css/public.css" type="text/css" rel="stylesheet" />
    <link href="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>css/member.css" type="text/css" rel="stylesheet" />
    <link href="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>css/ie.css" type="text/css" rel="stylesheet" />

    <script language="Javascript" type="text/javascript" src="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>js/jquery-1.6.2.min.js"></script>

    <!--登陆注册 弹出窗口-->
    <style type="text/css" media="all">
        @import "<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>js/login/thickbox.css";
    </style>

    <script src="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>js/login/thickbox.js" type="text/javascript"></script>

     <link href="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>art_dialog/skins/idialog.css" rel="stylesheet" />

    <script type="text/javascript" src="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>art_dialog/artDialog.js"></script>

    <script type="text/javascript" src="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>art_dialog/plugins/iframeTools.source.js"></script>

    <script type="text/javascript" src="<%=(new Web.Old_App_Code.TemplateLoad()).TemplateCssLoad() %>js/art_dialog.js"></script>

    <script type="text/javascript">
        function send_request(url, poststr) {
            http_request = false;
            if (window.XMLHttpRequest) {
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) {
                    http_request.overrideMimeType('text/xml');
                }
            } else if (window.ActiveXObject) {
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) { }
                }
            }
            if (!http_request) return false;
            http_request.onreadystatechange = processRequest;
            http_request.open("POST", url, true);
            http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            http_request.send(poststr);
        }
        function processRequest() {
            if (http_request.readyState == 4) {
                if (http_request.status == 200) {
                } else { }
            }
        }
        function showContent(obj, rowIndex) {
            var id = "trContent_" + obj;
            var type = document.getElementById(id).style.display;
            if (type == "none")
                document.getElementById(id).style.display = "block";
            else
                document.getElementById(id).style.display = "none";
            var tb = document.getElementById("tbInBox");
            poststr = "id=" + obj;
            send_request('read_in_box.ashx', poststr);
            tb.rows[parseInt(rowIndex)].cells[2].innerHTML = "是";
            return false;
        }
    </script>

</head>
<body>
    <uc1:header ID="Header1" runat="server" />
    <uc2:top_ad ID="Top_ad1" runat="server" />
    <div class="container">
        <uc3:member_menu ID="Member_menu1" runat="server" />
        <!--end leftnav-->
        <div class="rightcontent">
            <h5>
                <strong>收件箱</strong></h5>
            <table id="tbInBox">
                <tr>
                    <th>
                        标题</th>
                    <th>
                        发件人</th>
                    <th>
                        已读</th>
                    <th>
                        时间</th>
                    <th>
                        操作</th>
                </tr>
                <asp:Repeater ID="rptInBox" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <label onclick='showContent("<%# Eval("id") %>",this.parentNode.parentNode.rowIndex);'>
                                    <a href="javascript:return false;">
                                        <%# Eval("title") %>
                                    </a>
                                </label>
                            </td>
                            <td>
                                <%# Eval("sender") %>
                            </td>
                            <td>
                                <%# Convert.ToInt32(Eval("isRead"))==0?"否":"是"%>
                            </td>
                            <td>
                                <%# Eval("receiveTime") %>
                            </td>
                            <td>
                                <a href="send_message.html?addressee=<%# System.Web.HttpUtility.UrlEncode(Eval("sender").ToString()) %>">
                                    回复</a> <a href="javascript:return false;" onclick="confirmMessage('您确定要删除操作吗？','/cn/member_center/in_box.html?id=<%# Eval("id") %>');">
                                        删除</a></td>
                        </tr>
                        <tr id="trContent_<%# Eval("id") %>" style="display: none;">
                            <td colspan="5">
                                <%# Eval("content") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <tr class="nocontact" style='display: <%# rptInBox.Items.Count==0?"block":"none"%>;'>
                            <td colspan="5" style="text-align: center; color: #ff0000;">
                                没有找到任何记录
                            </td>
                        </tr>
                    </FooterTemplate>
                </asp:Repeater>
            </table>
        </div>
        <!--end rightcontent-->
        <span class="clear"></span>
    </div>
    <uc4:footer ID="Footer1" runat="server" />
</body>
</html>
